using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Unit_UCapsulesCollider_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Unit.UCapsulesCollider);
            args = new Type[]{};
            method = type.GetMethod("Update", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Update_0);

            field = type.GetField("top", flag);
            app.RegisterCLRFieldGetter(field, get_top_0);
            app.RegisterCLRFieldSetter(field, set_top_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_top_0, AssignFromStack_top_0);
            field = type.GetField("down", flag);
            app.RegisterCLRFieldGetter(field, get_down_1);
            app.RegisterCLRFieldSetter(field, set_down_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_down_1, AssignFromStack_down_1);
            field = type.GetField("buf", flag);
            app.RegisterCLRFieldGetter(field, get_buf_2);
            app.RegisterCLRFieldSetter(field, set_buf_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_buf_2, AssignFromStack_buf_2);
            field = type.GetField("size", flag);
            app.RegisterCLRFieldGetter(field, get_size_3);
            app.RegisterCLRFieldSetter(field, set_size_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_size_3, AssignFromStack_size_3);
            field = type.GetField("offset", flag);
            app.RegisterCLRFieldGetter(field, get_offset_4);
            app.RegisterCLRFieldSetter(field, set_offset_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_offset_4, AssignFromStack_offset_4);
            field = type.GetField("radius", flag);
            app.RegisterCLRFieldGetter(field, get_radius_5);
            app.RegisterCLRFieldSetter(field, set_radius_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_radius_5, AssignFromStack_radius_5);
            field = type.GetField("circle", flag);
            app.RegisterCLRFieldGetter(field, get_circle_6);
            app.RegisterCLRFieldSetter(field, set_circle_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_circle_6, AssignFromStack_circle_6);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Unit.UCapsulesCollider());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Unit.UCapsulesCollider[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* Update_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Unit.UCapsulesCollider instance_of_this_method = (huqiang.Unit.UCapsulesCollider)typeof(huqiang.Unit.UCapsulesCollider).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Update();

            return __ret;
        }


        static object get_top_0(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).top;
        }

        static StackObject* CopyToStack_top_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).top;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_top_0(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).top = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_top_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @top = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Unit.UCapsulesCollider)o).top = @top;
            return ptr_of_this_method;
        }

        static object get_down_1(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).down;
        }

        static StackObject* CopyToStack_down_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).down;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_down_1(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).down = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_down_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @down = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Unit.UCapsulesCollider)o).down = @down;
            return ptr_of_this_method;
        }

        static object get_buf_2(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).buf;
        }

        static StackObject* CopyToStack_buf_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).buf;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_buf_2(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).buf = (UnityEngine.Vector2[])v;
        }

        static StackObject* AssignFromStack_buf_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2[] @buf = (UnityEngine.Vector2[])typeof(UnityEngine.Vector2[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Unit.UCapsulesCollider)o).buf = @buf;
            return ptr_of_this_method;
        }

        static object get_size_3(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).size;
        }

        static StackObject* CopyToStack_size_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).size;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_size_3(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).size = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_size_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @size = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Unit.UCapsulesCollider)o).size = @size;
            return ptr_of_this_method;
        }

        static object get_offset_4(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).offset;
        }

        static StackObject* CopyToStack_offset_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).offset;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_offset_4(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).offset = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_offset_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @offset = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Unit.UCapsulesCollider)o).offset = @offset;
            return ptr_of_this_method;
        }

        static object get_radius_5(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).radius;
        }

        static StackObject* CopyToStack_radius_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).radius;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_radius_5(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).radius = (System.Single)v;
        }

        static StackObject* AssignFromStack_radius_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @radius = *(float*)&ptr_of_this_method->Value;
            ((huqiang.Unit.UCapsulesCollider)o).radius = @radius;
            return ptr_of_this_method;
        }

        static object get_circle_6(ref object o)
        {
            return ((huqiang.Unit.UCapsulesCollider)o).circle;
        }

        static StackObject* CopyToStack_circle_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Unit.UCapsulesCollider)o).circle;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_circle_6(ref object o, object v)
        {
            ((huqiang.Unit.UCapsulesCollider)o).circle = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_circle_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @circle = ptr_of_this_method->Value == 1;
            ((huqiang.Unit.UCapsulesCollider)o).circle = @circle;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Unit.UCapsulesCollider();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
